# !/usr/bin/env python
# -- coding: utf-8 --
# @Author zengxiaohui
# Datatime:8/25/2021 10:49 AM
# @File:将labelme标注后的结果保存为图片
import cv2

from dataset.train_test_split import get_origin_image_points

if __name__ == '__main__':
    imagePath = r"7594539227000288-2_0_t.jpg"
    img, labels_tmp,classes = get_origin_image_points(imagePath)
    for (a, b) in labels_tmp:
        _ = cv2.line(img, (int(a[0]), int(a[1])), (int(b[0]), int(b[1])), (0, 255, 0), thickness=2)
    cv2.imwrite("sdf.jpg", img)